package com.annotation.bean;


import org.springframework.beans.factory.annotation.Value;

import javax.annotation.Resource;


public class Person {


    @Value("#{12-2}")
    private int age;

    @Value("yht")
    private String name;

    @Value("${person.niceName}")
    private String  niceName;


    public String getNiceName() {
        return niceName;
    }

    public void setNiceName(String niceName) {
        this.niceName = niceName;
    }

    public Person(int i, String yht) {
        age=i;
        name=yht;
        System.out.println("Person bean 的有参构造器启动！！！"+  this.toString());
    }
    public Person(){}

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Person{" +
                "age=" + age +
                ", name='" + name + '\'' +
                ", niceName='" + niceName + '\'' +
                '}';
    }
}
